package com.example.decorator;

import lombok.extern.slf4j.Slf4j;

/**
 * 装饰角色：
 * 1、需要实现装饰构件角色
 * 2、持有装饰构件角色
 *
 */
@Slf4j
public class Deconrator implements Component {

     private  Component component;


    public Deconrator(Component component) {
        this.component = component;
    }

    @Override
    public void doSomething() {
        log.info("进入方法 Deconrator  doSomething");
        component.doSomething();
    }
}
